<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\ActiveCode
 *
 * @property int $id
 * @property int $user_id 用户id
 * @property string|null $code 激活码
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode query()
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode whereCode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ActiveCode whereUserId($value)
 * @mixin \Eloquent
 */
class ActiveCode extends Model
{
    use HasFactory, HasDateTimeFormatter;

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
